import http from "@/http";

export default{
    sendCode:{
        name:'发送验证码',
        path:"/api/user/send/code2",
        call:async function (params:any = {}) {
            return await http.get(this.path,params)
        }
    },
    register:{
        name:'注册用户',
        path:"/api/user/register",
        call:async function (params:any = {}) {
            return await http.post(this.path,params)
        }
    },
    login:{
        name:'用户登录',
        path:"/api/user/login",
        call:async function (params:any = {}) {
            return await http.post(this.path,params)
        }
    },
    select:{
        name:'查询用户',
        path:"/api/user",
        call:async function (params:any = {}) {
            return await http.get(this.path,params)
        }
    },
    add:{
        name:'添加用户',
        path:"/api/user",
        call:async function (params:any = {}) {
            return await http.post(this.path,params)
        }
    },
    update:{
        name:'修改用户',
        path:"/api/user",
        call:async function (body:any = {}) {
            return await http.put(this.path,body)
        }
    },
    delete:{
        name:'删除用户',
        path:"/api/user",
        call:async function (params:any = {}) {
            return await http.delete(this.path,params)
        }
    },
    select2:{
        name:'查询用户',
        path:"/api/user/roles/batch",
        call:async function (params:any = {}) {
            return await http.get(this.path,params)
        }
    },
    selectx:{
        name:'查询用户',
        path:"/api/user/roles/x",
        call:async function (params:any = {}) {
            return await http.get(this.path,params)
        }
    }

}